import { createRouter, createWebHistory } from 'vue-router'
import Dashboard from '@/views/Dashboard.vue'
import ApplicationDetail from '@/views/ApplicationDetail.vue'

const routes = [
  {
    path: '/',
    name: 'Dashboard',
    component: Dashboard,
  },
  {
    path: '/application/:id',
    name: 'ApplicationDetail',
    component: ApplicationDetail,
    props: true, // 将路由参数作为 props 传入组件
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router
